package com.linkoog.devtools.project_manager.mac_tab;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.ProjectActivity;
import com.intellij.openapi.startup.StartupActivity;
import com.intellij.openapi.wm.impl.IdeFrameImpl;
import com.linkoog.devtools.jdkEx.JdkEx;
import com.linkoog.devtools.project_manager.settings.ProjectManagerSetting;
import com.linkoog.devtools.raw_index.PsiRawFileIndexManager;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

/**
 *  当开启mac tab时，新项目强制加入初始化
 */
public class NewProjectJoinToTabActivity implements StartupActivity.RequiredForSmartMode {


    @Override
    public void runActivity(@NotNull Project project) {
        if (JdkEx.isTabbingModeAvailable() && ProjectManagerSetting.getInstance().isForceProjectOneTab()) {
            ProjectTabOpertion.mergeAllWindows(IdeFrameImpl.getActiveFrame());
        }
    }



}
